<template>
  <div>
    <p>父传我：{{ msg }}</p>
    <button @click="$emit('reply', '我是子组件')">发送给父组件</button>
  </div>
</template>

<script setup>
defineProps<{ msg: string }>()
defineEmits(['reply'])
</script>
